package com.atguigu.gulimall.seckill.config;

import org.redisson.Redisson;
import org.redisson.api.RedissonClient;
import org.redisson.config.Config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author weichen
 * @email 519543138@qq.com
 * @date 2022-10-12 下午9:23
 */
@Configuration
public class MyRedissonConfig {

    @Bean
    public RedissonClient getRedisson(){
        Config config = new Config();
        config.useSingleServer().setAddress("redis://192.168.50.111:6379");
        RedissonClient redisson = Redisson.create(config);
        return redisson;
    }

}
